package com.wyix.entity;

/**
 * @author wangdx
 * @since 2025/8/5
 */
public class Course {
    private String courseId;   // 课程ID（如 "CS101"）
    private String courseName; // 课程名称
    private int remaining;     // 剩余名额

    public Course(String courseId, String courseName, int remaining) {
        this.courseId = courseId;
        this.courseName = courseName;
        this.remaining = remaining;
    }

    public String getCourseId() {
        return courseId;
    }

    public void setCourseId(String courseId) {
        this.courseId = courseId;
    }

    public String getCourseName() {
        return courseName;
    }

    public void setCourseName(String courseName) {
        this.courseName = courseName;
    }

    // getter 和 setter 方法
    public int getRemaining() {
        return remaining;
    }

    public void setRemaining(int remaining) {
        this.remaining = remaining;
    }

    @Override
    public String toString() {
        return "[课程: " + courseName + ", 剩余名额: " + remaining + "]";
    }
}
